/*
 *   Implementacao da Classe Carta
 *
 */



#include "includes/Card.h"

/* valor das figuras */

int ACE = 14;
const int KING = 13;
const int QUEEN = 12;
const int JACK = 11;

/* naipes */

const int SPADES = 0;
const int HEARTS = 1;
const int DIAMONDS = 2;
const int CLUBS = 3;

/* construtor da classe Card */

Card::Card(){
}

/* destruidor da classe Card */

Card::~Card(){
}
int Card::getValue(){
    return value;
}

int Card::getSuit(){
    return suit;
}

void Card::setCard(int v, int s){
    value = v;
    suit = s;
}

void Card::printCard(){
    char s;
    char v;
    if (suit == SPADES) s = 'S';
    else if (suit == HEARTS) s = 'H';
    else if (suit == DIAMONDS) s = 'D';
    else s = 'C';

    if (value >=2 && value <= 9) v = (char) value;
    else if (value == 10) v = 'T';
    else if (value == JACK) v = 'J';
    else if (value == QUEEN) v = 'Q';
    else if (value == KING) v = 'K';
    else v = 'A';

    printf("%c de %c\n", v, s);
}
